home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93c.txt / 000050_icon-group-sender _Sun Sep 12 18:09:02 1993.msg < prev    next >
Internet Message Format  |  1994-02-02  |  1KB

  1. Received: from owl.CS.Arizona.EDU by cheltenham.cs.arizona.edu; Mon, 13 Sep 1993 07:35:36 MST
  2. Received: by owl.cs.arizona.edu; Mon, 13 Sep 1993 07:35:35 MST
  3. Date: 12 Sep 93 18:09:02 GMT
  4. From: agate!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!ellis!goer@ucbvax.Berkeley.EDU  (Richard L. Goerwitz)
  5. Organization: University of Chicago
  6. Subject: Re: another newbie question (simple)
  7. Message-Id: <1993Sep12.180902.16530@midway.uchicago.edu>
  8. References: <26um1sINNjvj@dns1.NMSU.Edu>
  9. Sender: icon-group-request@cs.arizona.edu
  10. To: icon-group@cs.arizona.edu
  11. Status: R
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13.  
  14. cymorg@acca.nmsu.edu (Tanis Half-Elven) writes:
  15. >I would like to somehow take a string s, and rewrite it, say,
  16. >as a new string with each letter being the letter following
  17. >the one in the original word....ie:
  18. >
  19. >hello, becomes: ifmmp
  20.  
  21. maybe (assuming no &letters, and assuming z wraps around to a):
  22.  
  23.     procedure rotate(s)
  24.     static letters, newbies
  25.         initial {
  26.         letters := &ucase || &lcase
  27.             newbies := &ucase[2:0] || "A" || &lcase[2:0] || "a"
  28.     }
  29.     return map(s, letters, newbies)
  30.     end
  31.  
  32. This is just off the top of my head, and isn't tested.
  33.  
  34. -- 
  35.  
  36.    -Richard L. Goerwitz              goer%midway@uchicago.bitnet
  37.    goer@midway.uchicago.edu          rutgers!oddjob!ellis!goer
  38.